package com.xherorlclass.discovery.impl;

import com.xherorlclass.ServiceConfig;
import com.xherorlclass.discovery.AbstractRegistry;
import com.xherorlclass.discovery.Registry;
import com.xherorlclass.util.zookeeper.ZookeeperUtils;
import org.apache.zookeeper.ZooKeeper;

import java.net.InetSocketAddress;
import java.util.List;

/**
 * @author ：Xherorl
 * @date ：Created in 2023/8/24 22:41
 * @description：
 */
public class NacosRegistry extends AbstractRegistry {
    // 维护一个zk实例
    private ZooKeeper zooKeeper;

    public NacosRegistry() {
        this.zooKeeper = ZookeeperUtils.createZookeeper();
    }

    public NacosRegistry(String connectString, int timeout) {
        this.zooKeeper = ZookeeperUtils.createZookeeper(connectString,timeout);
    }

    @Override
    public void register(ServiceConfig<?> serviceConfig) {
        return;
    }

    @Override
    public List<InetSocketAddress> lookup(String serviceName, String group) {
        return null;
    }
}
